package com.dongrj.framework.starter.log.thread;

import com.dongrj.framework.core.utils.JsonUtils;
import com.dongrj.framework.starter.log.dingding.NoticeUtils;
import com.dongrj.framework.starter.log.model.ELKModel;

/**
 * @author dongrongjun
 * @date 2020/07/01
 */
public class ELKTask implements Runnable {

    private ELKModel elkModel;

    public ELKTask(ELKModel elkModel) {
        this.elkModel = elkModel;
    }

    @Override
    public void run() {
        String s = JsonUtils.toJson(elkModel);
        NoticeUtils.sendDingDing(s);
    }

    public ELKModel getElkModel() {
        return elkModel;
    }

    public void setElkModel(ELKModel elkModel) {
        this.elkModel = elkModel;
    }
}
